home *** CD-ROM | disk | FTP | other *** search
- * Program CPRUPDAT - Allows entry/editing of property items
- Store T to level3
- Set colon on
- Set bell on
- Store d+':CPRLOCAT' to MFILE1
- Store T to initial
- Use &MFILE index &MFILE,&MFILE1
- Do while LEVEL3
- If .not. initial
- Erase
- @ 18,20 say 'Property Update Routine 1-/CPRUPDAT/'
- endif
- @ 20,4 say ;
- 'This routine allows adding and changing records in the CPROPRTY file.'
- ?
- ? ' Select: [A]dd an entry [C]hange an item'
- Accept ' [D]elete an item [Q]uit ' to esel
- ?
- Store F to initial
- Store F to DO:EDIT
- Store T to inval2
- Do while inval2
- Store F to inval2
- Do CASE
- CASE !(ESEL)='A'
- Append blank
- Store T to DO:EDIT
- CASE !(esel)='C' .or. !(esel)='D'
- If len(esel)>1
- Store len(esel)-1 to lenxx
- Store val($(esel,2,lenxx)) to I
- ? 'Going to record',I
- GOTO I
- else
- Accept 'Enter property item number' to XX
- GOTO &XX
- endif
- If #=0
- Accept 'Cannot fine XX' to XX
- else
- If !(esel)='D'
- ? '#',str(#,4),iname,itype,ilocation
- Accept 'OK to DELETE this item? ' to XX
- If !(XX)='Y'
- DELETE
- ? iname,itype,' is deleted.'
- Replace iname with '`'+iname
- else
- ? 'Not deleted.'
- endif
- else
- Store T to DO:EDIT
- endif
- endif
- CASE !(ESEL)='Q'
- Store F to LEVEL3
- otherwise
- Accept 'Invalid entry. Please enter again' to ESEL
- Store T to inval2
- endcase
- enddo
- If DO:EDIT
- Set intensity on
- ERASE
- @ 1,1 say MFILE
- @ 1,62 say 'Record number'+str(#,5)
- @ 2,20 say chname+' property items editing.'
- @ 5,4 say 'item ' get iname
- @ 6,4 say 'type ' get itype
- @ 7,4 say 'location ' get ilocation
- @ 8,4 say 'cost ' get icost
- @ 9,4 say 'value ' get ivalue
- @ 10,4 say 'status ' get status
- @ 5,40 say 'used by ' get used:by
- @ 6,40 say 'received by ' get recvd:by
- @ 7,40 say 'date obtained ' get indate
- @ 8,40 say 'brand ' get ibrand
- @ 9,40 say 'next service date' get servdate
- @ 10,40 say 'checked out ' get chkd:out
- ?
- ? ' Press <ctrl-W> when complete.'
- ReAD
- Set intensity off
- endif
- enddo
- USE
- Set colon off
- Set bell off
- RETURN
-
- OTO &XX
- endi + C-3 Hill Sherrie